package cn.edu.scnu.semart.user.service;

import cn.edu.scnu.semart.model.user.Address;
import cn.edu.scnu.semart.vo.user.AddressAddDTO;
import cn.edu.scnu.semart.vo.user.AddressUpdateDTO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface AddressService extends IService<Address> {
    List<Address> listByUser(Integer userId);
    boolean setDefault(Integer addressId, Integer userId);

    void addAddress(AddressAddDTO dto, Integer userId);

    void updateAddress(AddressUpdateDTO dto, Integer userId);

    List<Address> getAddressesByIds(List<Integer> addressIds);

    Address getAddressById(Integer userId, Integer addressId);
}